<article class="help">
  <section class="main">
    <div class="headings">
      <p class="title">FOREACH</p>
      <p class="subtitle">Operate on a collection</p>
    </div>
    <div class="content">
      <p>The <code>FOREACH</code> clause is used to update data within a collection whether components of a path, or result of aggregation.</p>
      <div class="links">
        <div class="link">
          <p class="title">Reference</p>
          <p class="content">
            <code><a target="_blank" href="https://neo4j.com/docs/developer-manual/3.2/cypher/clauses/foreach/">FOREACH</a> manual page</code>
          </p>
        </div>
        <div class="link">
          <p class="title">Related</p>
          <p class="content">
            <a help-topic="create">:help CREATE</a>&nbsp;
            <a help-topic="delete">:help DELETE</a>&nbsp;
            <a help-topic="set">:help SET</a>&nbsp;
            <a help-topic="cypher">:help Cypher</a>
          </p>
        </div>
      </div>
    </div>
  </section>
  <section class="example">
    <figure class="runnable">
      <pre>MATCH p = (ups)&lt;-[DEPENDS_ON]-(device) WHERE ups.id='EPS-7001'
FOREACH (n IN nodes(p) | SET n.available = FALSE )</pre>
      <figcaption>Mark all devices plugged into a failed UPS as unavailable.</figcaption>
    </figure>
  </section>
</article>
